/* ============================================
   SMART OASIS 2.0 — Design System
   Roayat Al Mostaqbal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* ── Brand Colors ── */
    --navy-primary: #29396d;
    --navy-deep: #0f1b3d;
    --navy-darker: #080e20;
    --teal-accent: #79c7c7;
    --teal-bright: #00e5c8;
    --teal-glow: rgba(0, 229, 200, 0.15);
    --teal-soft: rgba(121, 199, 199, 0.1);

    /* ── Status Colors ── */
    --status-healthy: #22c55e;
    --status-watch: #f5a623;
    --status-suspect: #f97316;
    --status-infested: #ef4444;
    --status-info: #3b82f6;

    /* ── Surfaces ── */
    --bg-body: #060b18;
    --bg-section: #0a1128;
    --surface-dark: #111827;
    --surface-mid: #1e293b;
    --surface-light: #283548;
    --surface-glass: rgba(17, 24, 39, 0.7);
    --surface-glass-border: rgba(121, 199, 199, 0.12);
    --surface-glass-hover: rgba(121, 199, 199, 0.06);

    /* ── Text ── */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-accent: #79c7c7;

    /* ── Typography ── */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* ── Font Sizes (fluid) ── */
    --fs-hero: clamp(2.8rem, 5vw, 4.5rem);
    --fs-h1: clamp(2rem, 3.5vw, 3rem);
    --fs-h2: clamp(1.5rem, 2.5vw, 2.25rem);
    --fs-h3: clamp(1.15rem, 1.8vw, 1.5rem);
    --fs-h4: 1.125rem;
    --fs-body: 1rem;
    --fs-small: 0.875rem;
    --fs-xs: 0.75rem;
    --fs-mono: 0.8125rem;

    /* ── Spacing ── */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-section: clamp(4rem, 8vw, 8rem);

    /* ── Border Radius ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow-teal: 0 0 20px rgba(0, 229, 200, 0.15), 0 0 60px rgba(0, 229, 200, 0.05);
    --shadow-glow-navy: 0 0 20px rgba(41, 57, 109, 0.3);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);

    /* ── Transitions ── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;

    /* ── Z-Index Scale ── */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-nav: 500;
    --z-modal: 1000;
    --z-toast: 1500;

    /* ── Dashboard Specific ── */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --panel-gap: 16px;
}

/* ============================================
   BASE RESET & GLOBALS
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color var(--duration-normal) ease,
                box-shadow var(--duration-normal) ease;
}

.glass-card:hover {
    border-color: rgba(121, 199, 199, 0.25);
    box-shadow: var(--shadow-card), var(--shadow-glow-teal);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal-accent), var(--teal-bright));
    color: var(--navy-deeper, #0a1128);
    box-shadow: 0 4px 16px rgba(0, 229, 200, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 229, 200, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--teal-accent);
    border: 1px solid var(--teal-accent);
}

.btn-secondary:hover {
    background: var(--teal-glow);
    transform: translateY(-2px);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--surface-mid);
    color: var(--text-muted);
    transition: all var(--duration-fast) ease;
}

.btn-icon:hover {
    background: var(--surface-light);
    color: var(--teal-accent);
}

/* ── Badge / Chip ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.badge-teal {
    background: var(--teal-glow);
    color: var(--teal-bright);
    border: 1px solid rgba(0, 229, 200, 0.2);
}

.badge-healthy {
    background: rgba(34, 197, 94, 0.12);
    color: var(--status-healthy);
}

.badge-warning {
    background: rgba(245, 166, 35, 0.12);
    color: var(--status-watch);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--status-infested);
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--status-info);
}

/* ── Section Heading ── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--teal-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-md);
}

.section-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--teal-bright), transparent);
}

.section-title {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--teal-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: var(--fs-body);
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.7;
}

/* ── Status Dot ── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-dot.pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.4;
    animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.4; }
    70% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slower) var(--ease-out),
                transform var(--duration-slower) var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity var(--duration-slower) var(--ease-out),
                transform var(--duration-slower) var(--ease-out);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity var(--duration-slower) var(--ease-out),
                transform var(--duration-slower) var(--ease-out);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* ── Selection ── */
::selection {
    background: rgba(0, 229, 200, 0.25);
    color: var(--text-primary);
}
